<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
     <title>公司设置</title>
     <link rel="stylesheet" href="${pageContext.request.contextPath}/cts/css/style.css" type="text/css"/>
	 <script type="text/javascript" src="${pageContext.request.contextPath}/cts/js/jquery.js"></script>
	 <script type="text/javascript" src="${pageContext.request.contextPath}/cts/js/common.js"></script>
	 <script type="text/javascript" src="${pageContext.request.contextPath}/cts/js/popdiv.js"></script>
	 <script type="text/javascript" src="${pageContext.request.contextPath}/cts/js/jquery.bgiframe.js"></script>
	 
	 	<style>
		.div_main{width:100%; float:left; background: #A6BC4F;}
		.div_left{width: 205px; float:left;}
		.setp_logo{
		     width: 100%; 
		     height:78px; 
		     line-height:78px;
		     text-align: center; 
			 background: url(${pageContext.request.contextPath}/cts/images/line_bottom.png) repeat-x bottom;
	    }
		.div_right{
		     width: 773px;
		     min-height:800px; 
		     _height:800px; 
		     float:right; 
		     padding-left:2px; 
		     background-image: url(${pageContext.request.contextPath}/cts/images/work_bg.jpg);
		 }
		.setp_top{
		    width: 100%; 
		    height:78px; 
		    margin-left:-45px; 
		    padding-left:45px; 
		    line-height: 78px; 
		    font-size: 18px;
			background: url(${pageContext.request.contextPath}/cts/images/line_bottom.png) repeat-x bottom;
	    }
		.setp_top{
		    width: 100%; 
		    height:78px; 
		    margin-left:-45px; 
		    padding-left:45px; 
		    line-height: 78px; 
		    font-size: 18px;
			background: url(${pageContext.request.contextPath}/cts/images/line_bottom.png) repeat-x bottom;
	    }
		.setp_top_btn{
		    float: right; 
		    margin-right: 10px; 
		    _position: relative; 
		    _top: 20%
		}
		.setp_main{margin-top: 20px}
		
		.step{
		    display:block; 
		    float:right; 
		    margin: 0; 
		    margin-top:5px; 
		    width: 165px; 
		    height:40px; 
		    _position:relative;
			line-height:42px; 
			font-size: 18px; 
			color:white; 
			text-align: right; 
			padding-right: 20px; 
			text-decoration: none;
		 }
		.step1{
		    background-image: url(${pageContext.request.contextPath}/cts/images/work_bg.jpg); 
		    color:#676767; 
		    border-bottom:1px solid #556028;
			-moz-border-top-left-radius: 6px;
			-webkit-border-top-left-radius: 6px; 
			border-top-left-radius: 6px;
			-moz-border-bottom-left-radius: 6px;
			-webkit-border-bottom-left-radius: 6px; 
			border-bottom-left-radius: 6px;}
			
		.btn_ok {background-image: url(${pageContext.request.contextPath}/cts/images/btn_ok2.png); 
			border:none; 
			width: 80px; 
			height: 30px;
			width: 125px\9; 
			height: 45px\9; 
			padding-top: 12px; 
			padding-right: 45px; 
			margin-bottom:3px;
			margin-bottom:0px\9;
			color:#676767; 
			cursor: pointer;
			font-size:20px;
			font-weight: bold;
			float:right;
			
		}
		
	  a{
		  text-decoration: none;
	  }
		
	  .trChNodeBg td{
         background-color:#E8ECD3;
      }
     
     .td0{
       border-top:1px solid gray;
      }
     
     .td1{
       border-left:1px solid gray;
       border-right:1px solid gray;
       border-bottom:1px solid gray;
     }
     
     .td2{
       border-right:1px solid gray;
       border-bottom:1px solid gray;
     }
     
     .clBg td{
       background-color: #FFFDF3;
     }
     
     .clBg2 td{
       background-color: #fff;
     }
     
     .twidth{
           height:25px;line-height:25px;
       }
	</style>
	
	<script type="text/javascript">
	   var mtype = '<s:property value="#request.maintype"/>';
	   var type = "<s:property value="#request.type"/>";
	   var searchtype = "<s:property value="#request.searchtype"/>";
	   var searchstatus = "<s:property value="#request.searchstatus"/>";
	   
	   function changeContent(type){
	      /*selectItem(type);
	      
	      var url = '${pageContext.request.contextPath}/cts/findCompanyInfo?type='+type;
	      if(type == '0' || type == '1'){
	          url = '${pageContext.request.contextPath}/cts/findEmployee?type='+type;
	      }else if(type == 'file'){
	          url = '${pageContext.request.contextPath}/cts/findDocTempList?type='+type;
	      }
	      
	      url = url + '&pageSize=<s:property value="pageSize"/>';
	      url = url + '&pageNumber=<s:property value="pageNumber"/>';
	      url = url + '&keyword=<s:property value="keyword"/>';
	      url = url + '&searchtype=<s:property value="#request.searchtype"/>';
	      url = url + '&searchstatus=<s:property value="#request.searchstatus"/>';
	      
	      $.post(url , "" , function(data){
	         $("#rightContent").html(data);
	      });*/
	   }
	   
	   function reWindow(type , isPage){
	     /*
		     var serl = $("#allFromPage").serialize();
		     var url = '${pageContext.request.contextPath}/mainMeun?maintype='+type;
		     if(url!='' && isPage!=false){
			     url = url + "&" + serl;
		     }
	         window.location.href = url;
	      */
	    
	   }
	   function selectItem(type){
	      $("#div_left").find("a[id*='a_step']").removeClass("step1");
	      $("#div_left").find("a[id='a_step_"+type+"']").addClass("step1");
	      
	      $("#searchtype").find("option[id='"+searchtype+"']").attr("selected" , "selected");
	      $("#searchstatus").find("option[id='"+searchstatus+"']").attr("selected" , "selected");
	   }
	   
	   function setFormAction(type){
		   var url = '${pageContext.request.contextPath}/cts/findCompanyInfo?type='+type;
	       if(type == '0' || type == '1'){
	          url = '${pageContext.request.contextPath}/cts/findEmployee?type='+type;
	       }else if(type == 'file'){
	          url = '${pageContext.request.contextPath}/cts/findDocTempList?type='+type;
	       }
	       
	       var form = document.getElementById("allFromPage");
	       form.action = url;
	   }
	   
	    function setFormAction2(type){
		   var url = '${pageContext.request.contextPath}/cts/findCompanyInfo?type='+type;
	       if(type == '0' || type == '1'){
	          url = '${pageContext.request.contextPath}/cts/findEmployee?type='+type;
	       }else if(type == 'file'){
	          url = '${pageContext.request.contextPath}/cts/findDocTempList?type='+type;
	       }
	       
	       window.location.href = url;
	   }
	   
	   function submitForm(type){
		    setFormAction(type);
		    var form = document.getElementById("allFromPage");
		    form.submit();
	   }
	   
	   $(function(){
		  selectItem(type);
		  setFormAction(type);
	      //changeContent(mtype);
	   });
	   
	   
	</script>
	
	
	<script type="text/javascript">
	   // 禁用参数
       function stopToUsing(id , ctstype){
          if(!confirm("您确要进行此操作")){
	        return;
	      }
	      
          var url = "${pageContext.request.contextPath}/cts/stopToUsing?id="+id + "&ctstype="+ctstype;
          $.post(url , "" , function(data){
              if(data == 1){
                alert("禁用成功");
                window.location.reload();
              }else{
                alert("禁用失败");
              }
          });
       }
	</script>
	<STYLE type="text/css">
	   .pagination {
			margin-top: 5px;
			vertical-align: middle;
			line-height: 22px;
			margin-left: 18px;
			color: #1E50A2;
			width: 600px;
			border: 0px solid red;
		}
		.pagination select{
			border:1px solid #bbb;width:48px;padding:2px;margin: 0px;
		}
	</STYLE>
  </head>
  
  <body>
     <input type="hidden" id="maintype" name="maintype" value="<s:property value="#request.maintype"/>"/>
     <div style="width: 980px; margin: 0 auto; color:#676767; text-align: left;">
  		<div class="div_main">
	  		<div class="div_right">
	  		   <div style="width:773px;height:auto" id="rightContent">
			  		 <s:if test="#request.type!='' && (#request.employee.type == 2 || #request.employee.auth3 == 1 || #request.employee.auth4 == 1 || #request.employee.auth5 == 1 || #request.employee.auth6 == 1 || #request.employee.auth10 == 1)">
			  		     <s:if test="#request.isEmp == 1">
			  		         <jsp:include page="listEmployee.jsp"></jsp:include>
			  		     </s:if>
			  		     <s:else>
				  		      <jsp:include page="companyParamList.jsp"></jsp:include>
			  		     </s:else>
			  		 </s:if>
	  		   </div>
	  		</div>
	  		<div class="div_left" id="div_left">
	  			<div class="setp_logo" style="font-size:30px;font-weight:bold;color:#fff;vertical-align: middle;">公司设置</div>
		  		   <s:if test="#request.employee.auth3 == 1 || #request.employee.type == 2">
		  			  <a id="a_step_item" href="javascript:setFormAction2('item')" class="step step1">作业项目</a>
		  		   </s:if>
		  		   <s:if test="#request.employee.auth6 == 1 || #request.employee.type == 2">
			  		  <a id="a_step_file" href="javascript:setFormAction2('file')" class="step">文档模板</a>
		  		   </s:if>
		  		   <s:if test="#request.employee.auth10 == 1 || #request.employee.type == 2">
	  			      <a id="a_step_fee" href="javascript:setFormAction2('fee')" class="step">费用</a>
		  		   </s:if>
		  		   <s:if test="#request.employee.auth4 == 1 || #request.employee.type == 2">
		  			  <a id="a_step_tag" href="javascript:setFormAction2('tag')" class="step">标签</a>
		  		   </s:if>
		  		   <s:if test="#request.employee.type == 2">
	  			     <a id="a_step_0" href="javascript:setFormAction2('0')" class="step">员工</a>
		  		   </s:if>
		  		   <s:if test="#request.employee.auth5 == 1 || #request.employee.type == 2">
	  			     <a id="a_step_1" href="javascript:setFormAction2('1')" class="step">访客</a>
		  		   </s:if>
	  		</div>
  		</div>
  	</div>
  </body>
</html>
